#include <cstdio>

__int64 check( __int64 l, __int64 r, __int64 p )
{
    __int64 i, t, s = 0;
    for ( i = l; i <= r; i++ )
    {
        t = i;
        if ( t == 0 && t == p )
            s++;
        while ( t )
        {
            if ( t % 10 == p )
                s++;
            t /= 10;
        }
    }
    return s;
}

__int64 getsum2( __int64 n, __int64 p, __int64 flag )
{
    __int64 i, ans = 0;
    i = n;
    while ( i != 1 )
    {
        ans++;
        i /= 10;
    }
    ans = n * ans / 10;
    if ( p == 0 && flag )
    {
        i = n / 10;
        while ( i > 1 )
        {
            ans -= i;
            i /= 10;
        }
        if ( ans == 0 )
            ans = 1;
    }
    return ans;
}

__int64 getsum1( __int64 n, __int64 p, __int64 flag )
{
    __int64 i = 1, j, ans = 0, t = 0, tt = 0, tp;
    while ( i * 10 <= n )
        i *= 10;
    if ( i == 1 )
        return p <= n;
    for ( j = 0; i * ( j + 1 ) <= n; j++ )
        ans += getsum2( i, p, flag && j == 0 ) + ( j == p && ( j != 0 || flag == 0 ) ) * i;
    t = n - i * j;
    tp = i / 10;
    if ( p == 0 )
    {
        while ( t < tp )
        {
            tp /= 10;
            tt++;
        }
        if ( tp == 0 )
            tt--;
    }
    //pr__int64f("%d %d %d\n", getsum2( i, p, 1 ), ans, tt);
    if ( p )
        ans += getsum1( n - i * j, p, 0 ) + ( ( j == p ) + tt ) * ( n - i * j + 1 );
    else
        ans += getsum1( n - i * j, p, 0 ) + tt * ( n - i * j + 1 );
    return ans;
}

int main( )
{
    __int64 i, t, a, b;
    while ( scanf("%I64d%I64d", &a, &b) )
    {
        if ( a == 0 && b == 0 )
            break;
        if ( a > b )
        {
            t = a;
            a = b;
            b = t;
        }
        printf("%I64d", getsum1( b, 0, 1 ) - getsum1( a - 1, 0, 1 ));
        for ( i = 1; i <= 9; i++ )
            printf(" %I64d", getsum1( b, i, 1 ) - getsum1( a - 1, i, 1 ));
        printf("\n");
    }
    return 0;
}